Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with services #915

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

DNjava
Copy link

@DNjava DNjava commented Jan 21, 2024

No description provided.

public boolean login(String email, String password) {
return false;
UserService userService = new UserService();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make user a private field instead of a local variable

@DNjava DNjava requested a review from okuzan January 21, 2024 13:58
Copy link

@okuzan okuzan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I meant a userService, user should be a local field :)

Comment on lines 11 to 13
this.user = userService.findByEmail(email);

return this.user != null && this.user.getPassword().equals(password);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check this out to know where we need this
https://stackoverflow.com/a/2411283
when we don't, no need to use it

@DNjava DNjava requested a review from okuzan January 21, 2024 14:08
Copy link

@Ivan95kos Ivan95kos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants